package com.heshida.controller;

import com.heshida.po.OrderDetailet;
import com.heshida.service.OrderDetailetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OrderDetailetController")
public class OrderDetailetController {

    @Autowired
    private OrderDetailetService orderDetailetService;

    @RequestMapping("/listOrderDetailetByOrderId")
    public Object listOrderDetailetByOrderId(String orderId){
        Integer orderId1=Integer.valueOf(orderId);

        List<OrderDetailet> orderDetailetsList = orderDetailetService.listOrderDetailetByOrderId(orderId1);
        return orderDetailetsList;
    }
}
